package cn.tedu.tmall.common.ex;

import cn.tedu.tmall.common.web.ServiceCodeEnum;

/**
 * 自定义业务异常
 */
public class ServiceException extends RuntimeException {
    private Integer serviceCode;

    public ServiceException(Integer serviceCode, String msg) {
        super(msg);
        this.serviceCode = serviceCode;
    }
    public ServiceException(ServiceCodeEnum serviceCode) {
        super(serviceCode.getMsg());
        this.serviceCode = serviceCode.getCode();
    }
}
